package org.ws.edu.struts.action;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.ws.edu.common.model.Appointment;
import org.ws.edu.struts.util.HttpHandlerClient;

import com.opensymphony.xwork2.ActionSupport;

public class AppointmentsActionClass extends ActionSupport {

    private static final long serialVersionUID = 1L;

    @Autowired
    private HttpHandlerClient client;

    List<Appointment> list = null;

    public List<Appointment> getList() {
        return list;
    }

    public void setList(List<Appointment> list) {
        this.list = list;
    }

    @Override
    public String execute() throws Exception {

        list = client.requestList("appointment");

        return SUCCESS;
    }

}